/**
 * Created by shandianhaizan on 16/7/11.
 */
var AV = require('leanengine');

var model = {};

model.name = 'Record';



model.getQuery = function(){
    return new AV.Query(model.name);
};

model.formatQuery = function(arg_query, arg_params) {
    if(arg_params.recordId)  {
        arg_query.equalTo("recordId", arg_params.recordId);
    }
    return arg_query;
};






model.getObject = AV.Object.extend(model.name);




//Todo check param valid
model.validation  = function(params){
    params.oldValue = params.oldValue.toString();
    params.newValue = params.newValue.toString();
    return {success:true};
};


module.exports = model;